home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Singles Flirt Up Your Life! (German)
/
Singles Flirt Up Your Life.iso
/
data1.cab
/
Statemachine
/
testmission.lua
< prev
next >
Wrap
Text File
|
2004-01-29
|
2KB
|
125 lines
-- Shakehands Testmission
--
-- used mission objects:
-- trigger1 - triggers hello in initial state
beginStateMachine()
onMsg("unpacked", function(msg)
--getParent().getCharacter(ELAINE).setEnable(true);
print("testMisssion - unpacked");
getStateObjectFromID(tonumber(msg.data)).deleteGameObject();
local ausgepackt = getParent().getEditor().getPrototypeByName("SofaOldschool");
if (ausgepackt) then
getParent().getEditor().setMode(Editor.BUY_MODE);
getParent().getEditor().selectPrototype(ausgepackt,true);
end
setState("placeme");
end )
state("placeme")
onMsg("placed", function(msg)
getParent().getEditor().setMode(Editor.LIFE_MODE);
setState("_GLOBAL");
end )
onDefault( function(msg)
print("DEFAAAAAAAULT: "..msg.name.." "..msg.data);
end )
onMsg("enterTrigger", function(msg)
getParent().getCharacter(ELAINE).walkSO.walkToActionPoint(
getParent().getCharacter(MIKE).getActionPoint("talk")
);
setState("conversation");
end )
state("conversation")
onMsg("arrived", function(msg)
popupConversation(
"Elaine:angry:hehe ich bin elaine und probiere gerade was:ok;"..
"Mike:angry:muahahaaa das macht mich wuetend:ok;" );
setState("_GLOBAL");
end )
endStateMachine()
function bla()
onMsg("arrived", function(msg)
if ( getStateObjectFromID(msg.sender).isMale() ) then
print("mike is angekommen");
else
print("linda is angekommen");
end
end )
onMsg("sat", function(msg)
if ( getStateObjectFromID(msg.sender).isMale() ) then
print("mike is sitting now");
else
print("linda is sitting now");
end
end )
onMsg("repaired", function(msg)
print("somethin got repaired");
end )
onMsg("on", function(msg)
print("somethin got switched on");
getStateObjectFromID(tonumber(msg.data)).setBroken(true);
end )
onMsg("off", function(msg)
print("somethin got switched off");
end )
onMsg("unpacked", function(msg)
--getParent().getCharacter(ELAINE).setEnable(true);
getStateObjectFromID(tonumber(msg.data)).deleteGameObject();
local ausgepackt = getParent().getEditor().getPrototypeByName("SofaOldschool");
if (ausgepackt) then
getParent().getEditor().setMode(Editor.BUY_MODE);
getParent().getEditor().selectPrototype(ausgepackt,true);
end
setState("placeme");
end )
end